#ifndef _MOZ_DISPATCH
#define _MOZ_DISPATCH

#include "moz_xul_reference.hpp"

class moz_dispatch
{
private:
	moz_xul_reference _command_list;
	moz_xul_value _value_list;

	bool wait_ready_state_interactive(void ) const;

public:	

	bool dispatch(FILE** file, std::string const& _connection_str) const;

	std::string const get_command() const; // if string is null, no more commands available
	bool get_semaphore() const;
	bool get_semaphore_on_value() const;
	moz_dispatch const& operator++() const;

	moz_dispatch(std::string const& _command_filename, std::string const& _value_filename);

	friend std::ostream& operator << (std::ostream& ost, moz_dispatch const& c);	
};

#endif
